package com.stepforward.me;

import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;

public class clarifyAddress extends Activity{
	protected void onCreate(Bundle savedInstanceState) {       
		super.onCreate(savedInstanceState);       
		setContentView(R.layout.clarifypage); 
		Spinner spinner = (Spinner) findViewById(R.id.clarifyspinner);
		Bundle extras = getIntent().getExtras();

		String departure = extras.getString("departure");
		String arrival = extras.getString("arrival");
		String month = extras.getString("month");
		String day = extras.getString("day");
		String year = extras.getString("year");
		String hour = extras.getString("hour");
		String minute = extras.getString("minute");
		String pm = extras.getString("ampm");
		String type = extras.getString("type");
		ArrayList<String> sugesstion = extras.getStringArrayList("sugesstion");
		
		TextView dateView = (TextView) findViewById(R.id.clarifyDate);
		dateView.setText(month+"-"+day+"-"+year);
		
		TextView timeView = (TextView) findViewById(R.id.clarifyTime);
		timeView.setText(hour+":"+minute+" "+pm);
		
		TextView stop1ViewLabel = (TextView) findViewById(R.id.clarifyStop1Label);
		TextView stop1View = (TextView) findViewById(R.id.clarifyStop1Label);
		TextView stop2ViewLabel = (TextView) findViewById(R.id.clarifyStop2Label);
		
		stop1ViewLabel.setText(type);
		/**
		if (type.equals("Departure")){
			stop1ViewLabel.setText("Arrival");
			stop1View.setText(arrival);
			stop2ViewLabel.setText("Departure");
			
		}else if (type.equals("Arrival")){
			stop1ViewLabel.setText("Departure");
			stop1View.setText(arrival);
			stop2ViewLabel.setText("Arrival");
		}
		**/
		spinner.setAdapter(new ArrayAdapter<String>(this,
				android.R.layout.simple_dropdown_item_1line, sugesstion));

}
}
